<template>
  <div class="home">

    <Search ></Search>





  <div><van-tabbar v-model="active" style="height: 50px;opacity: 0.95;">
  <van-tabbar-item icon="home-o" >首页</van-tabbar-item>
   <van-tabbar-item icon="refund-o" @click="goFication">VIP</van-tabbar-item>
  <van-tabbar-item icon="user-circle-o" @click="goPersonal" >我的</van-tabbar-item>
</van-tabbar></div>


  </div>
</template>

<script>
// @ is an alias to /src

import Search from "@/components/Search";
import PersonalCenter from "@/components/PersonalCenter";
import Classification from "@/components/Classification";
import {Toast} from "vant";

export default {
  name: 'HomeView',
  data() {
    return {
      images: [
        'https://img01.yzcdn.cn/vant/apple-1.jpg',
        'https://img01.yzcdn.cn/vant/apple-2.jpg',
      ],
      active: 0,

    }
  },
  methods:{
   goPersonal(){
     this.$router.push('/personal')
   },
   goFication(){
     if(localStorage.getItem('username')===null){
       Toast('请先登录')
     }else {
       this.$router.push('/fication')
     }

   }
  },

  components: {
    Search,PersonalCenter,Classification
  },

}
</script>
<style scoped>

</style>